<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<c:forEach items="${models}" var="modele">
	<div class="boutiquebox bouton_boutique" align="left">
		<h3>${modele.nom}</h3>
		<img alt="${modele.nom}" src="${modele.idService.urlimage}"
			style="width: 100px; height: 100px;" /> <br> <span
			class="tpetit">${modele.description}</span> <br>
		<br>

		<p>
			<strong class="gros" style="color: rgb(127, 23, 23);">${modele.prix}</strong>
		</p>
		<br>
		<sec:authorize ifNotGranted="CLIENT">
		<form action="<c:url value="/login"/>" method="get">
			<p class="centre">
				<input type="submit" value="Ajouter au panier">
			</p>
		</form>
		</sec:authorize>
		<sec:authorize ifAnyGranted="CLIENT">
		<form action="<c:url value="/modele/addTocart"/>" method="get">
			<input type="hidden" value="${modele.id}" name="idm">
			<p class="centre">
				<input type="submit" value="Ajouter au panier">
			</p>
		</form>
		</sec:authorize>

		<p></p>
	</div>
</c:forEach>